# @Author: Eric Ito
# @Date: 1/26/2009
# Project Euler problem 9


"""
Find pythagorean triplet for p=1000
"""

import sys

def main(p):
	MAX_HYP = p/2
	HYP_2 = MAX_HYP**2
	# a**2 + b**2 must == HYP_2
	for c in range(1,501):
		for b in range(1,500):
			a = p - b - c
			if a+b+c == 1000 and a**2 + b**2 == c**2:
				print "a=",a
				print "b=",b
				print "c=",c
				print a*b*c
				return

if __name__ == "__main__":
	main(int(sys.argv[1]))